package com.muchfish.reactor.api;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public class ReactorThenExample {
    public static void main(String[] args) {
        Flux<Integer> source = Flux.just(1, 2, 3);

        // 在当前数据流完成后执行后续操作
        source.then(Mono.fromRunnable(() -> System.out.println("Done")))
                .subscribe();
    }
}
